package com.czy.owner.api;
import com.czy.owner.net.api.BaseApi;
import com.czy.owner.net.listener.HttpOnNextListener;
import com.trello.rxlifecycle.components.support.RxAppCompatActivity;
import retrofit2.Retrofit;
import rx.Observable;

/**
 * Created by wangyang on 2017/5/10 0010.
 */

public class GetCustomerApi extends BaseApi {
    private String session;
    private String storeId;
    private String type;
    private String userOrderId;

    public GetCustomerApi(HttpOnNextListener listener, RxAppCompatActivity rxAppCompatActivity) {
        super(listener, rxAppCompatActivity);
//        setShowProgress(false);
//        setCache(false);
//        setCookieNetWorkTime(0);
        setCache(true);
        setCookieNetWorkTime(0);
        setShowProgress(false);
    }

    public String getStoreId() {
        return storeId;
    }

    public void setStoreId(String storeId) {
        this.storeId = storeId;
    }

    public String getSession() {
        return session;
    }

    public void setSession(String session) {
        this.session = session;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getUserOrderId() {
        return userOrderId;
    }

    public void setUserOrderId(String userOrderId) {
        this.userOrderId = userOrderId;
    }

    @Override
    public Observable getObservable(Retrofit retrofit) {
        HttpPostService service = retrofit.create(HttpPostService.class);
        return service.getCustomerApi(getSession(),getStoreId(),getType(),getUserOrderId());
    }


}
